package com.example.springdemo;

import com.example.springdemo.reg.RegService;
import com.example.springdemo.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@ComponentScan
@EnableAspectJAutoProxy
public class SpringDemoApplication {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(SpringDemoApplication.class);
        UserService userService = (UserService) applicationContext.getBean("userService");
        userService.user();

        RegService regService = (RegService) applicationContext.getBean("regService");
        regService.reg("a*b|b*a", "ab");

    }

}
